package com.dd.cloud.auth.service.impl;

import com.dd.cloud.auth.entity.AdminRole;
import com.dd.cloud.auth.mapper.AdminRoleMapper;
import com.dd.cloud.auth.service.IAdminRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dd.cloud.common.vo.LoginInfo;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 管理员角色表 服务实现类
 * </p>
 *
 * @author czg
 * @since 2023-06-01
 */
@Service
public class AdminRoleServiceImpl extends ServiceImpl<AdminRoleMapper, AdminRole> implements IAdminRoleService {

    /**
     * @description 用户信息获取用户权限
     * @param loginInfo:
     * @return AdminRole
     * @author czg
     * @date 2023/6/14 16:48
    */
    @Override
    public AdminRole getAdminRoleByUser(LoginInfo loginInfo) {
        return getBaseMapper().getAdminRoleByUser(loginInfo.getId(), loginInfo.getType());
    }
}
